

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<script type="text/javascript" src="helpman_topicinit.js"></script>

<title>Generate XSD [Enterprise Architect User Guide]</title>

<meta name="keywords" content="Enterprise Architect, Sparx Systems, UML, Code Engineering,Code Engineering XML Schema, Generate XSD,Generate,Generate XSD,Generate XML Schema, For Child Packages,Generate XML Schema For Referenced Packages,Generate Global Element For Global ComplexTypes,XSD,XSD Generate,Global Element,Global Element Generate For Global ComplexTypes">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />

<link type="text/css" href="default.css" rel="stylesheet" />
<style type="text/css">
  A, A:Visited
  {
    color: #00F;
  }

  A:Active, A:Hover
  {
    color: #F00;
  }

  OL
  {
    margin: 5px 0 5px 48px;
  }

  UL
  {
    margin-bottom: 3px;
    margin-top: 0;
  }

  #nsr
  {
    background-color: #D4DFFF;
  }

  #nsr A
  {
    text-decoration: none;
  }

  #mainbody
  {
    padding: 8px;
  }

  .p_BodyText
  {
    padding: 5px 0;
  }
</style>



<style type="text/css" media="screen">
  BODY
  {
    background-color: #FFFFFF;
  }

  #nsr
  {
    padding: 6px 6px 0 6px;
    border-bottom: none;
    vertical-align: top;
    z-index: 2;
    visibility: visible;
    left: 0;
    top: 0;
    position: absolute;
  }

  #mainbody
  {
    left: 0;
    top: 0;
    margin: 0;
    position: absolute;
    padding: 10px;
    overflow: auto;
    height: 100%;
    z-index: 1;
    background-repeat: no-repeat;
    background-position: bottom right;
    background-attachment: fixed;
  }
</style>

<style type="text/css" media="print">
  #nsr
  {
    visibility: none;
  }

  #mainbody
  {
    overflow: visible;
  }
</style>
<script type="text/javascript" language="JavaScript" src="nonscroll.js"></script>

</head>
<body scroll="no">

<div id="page">



        <div id="content">
          <div id="content-inner">
          



  
          <div id="nsr">
            <table border="0" cellspacing="0" cellpadding="4" width="100%">
              <tr valign="top">
                <td align="left">
  


                  <p class="p_Heading1"><span class="f_Heading1">Generate XSD</span></p>



  
                </td>
                <td align="right">
                  <a href="introduction.htm" onmouseover="document.images.main.src='button_main_h.gif'" onmouseout="document.images.main.src='button_main.gif'">
                    <img name="main" src="button_main.gif" border=0 alt="Return to Introduction">
                  </a>&nbsp;
    
                  <a href="default_uml_xsd_mappings.htm" onmouseover="document.images.prev.src='button_prev_h.gif'" onmouseout="document.images.prev.src='button_prev.gif'">
                    <img name=prev src="button_prev.gif" border=0 alt="Previous page" />
                  </a>&nbsp;
    
    
    
                  <a href="garden_of_eden_style.htm" onmouseover="document.images.next.src='button_next_h.gif'" onmouseout="document.images.next.src='button_next.gif'">
                    <img name=next src="button_next.gif" border=0 alt="Next page" />
                  </a>
    
    
                </td>
              </tr>
            </table>
          </div>
          <div id="mainbody">
  


                <p class="p_BodyText"><span class="f_BodyText">The</span><span class="f_BodyText" style="font-style: italic;"> Generate XML Schema</span><span class="f_BodyText"> feature forward engineers a UML Class model to a W3C XML Schema (XSD) file. An XML schema corresponds to a UML package in Enterprise Architect, therefore XML schema generation is a package-level operation. To generate an XML schema from a package, follow the steps below:</span></p>
<ol style="text-indent: 0px; margin-left: 48px; list-style-position: outside;">
<li value=1><span class="f_NumberedList">In the </span><span class="f_UIControl">Project Browser</span><span class="f_NumberedList">, right-click on the package to be converted to XSD. The context menu displays.</span></li>
<li value=2><span class="f_NumberedList">Select the </span><span class="f_MenuKeyField">Code Engineering | Generate XML Schema</span><span class="f_NumberedList"> menu option. The </span><span class="f_UIControl">Generate XML Schema</span><span class="f_NumberedList"> dialog displays, showing the name of the selected package in the </span><span class="f_MenuKeyField">Source Package</span><span class="f_NumberedList"> field.</span><br>
<span class="f_NumberedList">&nbsp;</span><br>
<img src="generatexmldialog.png" width="462" height="637" border="0" alt="GenerateXMLDialog"><br>
<span class="f_NumberedList">&nbsp;</span></li>
<li value=3><span class="f_NumberedList">In the </span><span class="f_MenuKeyField">Encoding</span><span class="f_NumberedList"> field, set the required XML encoding.</span></li>
<li value=4><span class="f_NumberedList">In the </span><span class="f_UIControl">XSD Style</span><span class="f_NumberedList"> panel, the </span><span class="f_MenuKeyField">Generate global element for all global ComplexTypes</span><span class="f_NumberedList"> checkbox is selected by default to generate schema in the </span><span class="f_NumberedList" style="font-style: italic;"><a href="garden_of_eden_style.htm">Garden of Eden style</a>.</span></li>
<li value=5><span class="f_NumberedList">In the </span><span class="f_UIControl">Referenced Package Options</span><span class="f_NumberedList"> panel, select the:</span></li>
</ol>
<ul style="text-indent: 0px; margin-left: 65px; list-style-position: outside;">
<li><span class="f_MenuKeyField">Generate XSD for Referenced packages</span><span class="f_Bulletlist3"> checkbox to generate schema for packages that are referenced by any of the packages selected in the list box</span></li>
<li><span class="f_MenuKeyField">Prompt when missing Filename</span><span class="f_Bulletlist3"> checkbox to enable Enterprise Architect to prompt for a filename for a referenced package during schema generation, if the filename is missing.</span></li>
</ul>
<ol style="text-indent: 0px; margin-left: 48px; list-style-position: outside;">
<li value=6><span class="f_NumberedList">In the </span><span class="f_UIControl">Child Package Options</span><span class="f_NumberedList"> panel, select the:</span></li>
</ol>
<ul style="text-indent: 0px; margin-left: 65px; list-style-position: outside;">
<li><span class="f_MenuKeyField">Generate XSD for Child Packages</span><span class="f_Bulletlist3"> checkbox to generate schema for child packages of the selected package</span></li>
<li><span class="f_MenuKeyField">Include all packages</span><span class="f_Bulletlist3"> radio button to list all child packages under the parent package in the list box</span></li>
<li><span class="f_MenuKeyField">Include &lt;XSDschema&gt; packages</span><span class="f_Bulletlist3"> radio button to list only those packages that have the stereotype </span><span class="f_Bulletlist3" style="font-style: italic;">&laquo;XSDschema&raquo;</span><span class="f_Bulletlist3">.</span></li>
</ul>
<p class="p_Bulletlist3"><span class="f_Bulletlist3">The list box displays, for each package, the package name and the file path where the schema file is to be generated.</span></p>
<ol style="text-indent: 0px; margin-left: 48px; list-style-position: outside;">
<li value=7><span class="f_NumberedList">If it is necessary to change the file path for a package, double-click on the entry in the list box and, on the </span><span class="f_UIControl">Select XML File</span><span class="f_NumberedList"> dialog, type or select the appropriate file path.</span></li>
<li value=8><span class="f_NumberedList">Ensure that the checkbox is selected for each package required for generation.</span></li>
<li value=9><span class="f_NumberedList">Click on the </span><span class="f_MenuKeyField">Generate</span><span class="f_NumberedList"> button to generate the schema for each of the selected packages.</span></li>
<li value=10><span class="f_NumberedList">The progress of the schema generator is shown in the </span><span class="f_MenuKeyField">Progress</span><span class="f_NumberedList"> box.</span></li>
<li value=11><span class="f_NumberedList">When schema generation is complete, click on an entry in the list box and click on the </span><span class="f_MenuKeyField">View Schema</span><span class="f_NumberedList"> button to review the generated schema.</span></li>
</ol>
<div style="text-align: left; text-indent: 0px; padding: 0px 0px 0px 0px; margin: 5px 0px 5px 13px;"><table cellspacing="0" cellpadding="2" border="0" style="border: none; border-spacing:0px;">
<tr style="text-align:left;vertical-align:bottom;">
<td valign="bottom" width="952" bgcolor="#efeff7" style="width:952px; background-color:#efeff7;"><p class="p_TiporNote" style="border-top: none; border-right: none; border-left: none;"><span class="f_TiporNote">Tip:</span></p>
</td>
</tr>
<tr style="text-align:left;">
<td width="952" bgcolor="#f7f7ff" style="width:952px; background-color:#f7f7ff;"><p class="p_TiporNoteText"><span class="f_TiporNoteText">The </span><span class="f_UIControl">Generate XML Schema</span><span class="f_TiporNoteText"> dialog can also be accessed from the active diagram by selecting the </span><span class="f_MenuKeyField">Project | XML Schema | Generate XML Schema</span><span class="f_TiporNoteText"> menu option.</span></p>
</td>
</tr>
</table>
</div>




            </div>
          </div>
        </div>



</div>


</body>
</html>
